<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/carmanagement/carmanagement.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/demo/carmanagement/carmanagement.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'CarManagementId',
            footer: "Foots",
            cnName: '车辆管理表',
            name: 'carmanagement/carmanagement',
            url: "/basicwrite/api/carmanagement/",
            sortName: "CreateTime"
        });
        const editFormFields = ref({ "CarBrand": "", "CarLicense": "", "DriverName": "", "CarCompany": "", "CarLong": "", "CarWidth": "", "CarHight": "", "CarColor": "", "CarBuyDate": "", "CarRunLicence": "", "InsuranceOverDate": "", "CheckOverDate": "", "InsuranceNumber": "", "CarImg": "", "InsuranceImg": "" });
        const editFormOptions = ref([[{ "title": "厂牌型号", "required": true, "field": "CarBrand", "type": "text" },
        { "title": "车牌号", "required": true, "field": "CarLicense", "type": "text" }],
        [{ "title": "司机姓名", "required": true, "field": "DriverName", "type": "text" },
        { "title": "所属公司", "required": true, "field": "CarCompany", "type": "text" }],
        [{ "title": "车长", "required": true, "field": "CarLong", "type": "decimal" },
        { "title": "车宽", "required": true, "field": "CarWidth", "type": "decimal" },
        { "title": "车高", "required": true, "field": "CarHight", "type": "decimal" },
        { "title": "颜色", "required": true, "field": "CarColor", "type": "text" }],
        [{ "title": "购置日期", "required": true, "field": "CarBuyDate", "type": "date" },
        { "title": "营运证号", "required": true, "field": "CarRunLicence", "type": "text" }],
        [{ "title": "保险到期日期", "required": true, "field": "InsuranceOverDate", "type": "date" },
        { "title": "车检到期日期", "required": true, "field": "CheckOverDate", "type": "date" }],
        [{ "title": "保养公里数", "required": true, "field": "InsuranceNumber", "type": "decimal" }],
        [{ "title": "车辆照片", "required": true, "field": "CarImg", "type": "img" }],
        [{ "title": "保险卡照片", "required": true, "field": "InsuranceImg", "type": "img" }]]);
        const searchFormFields = ref({ "CarBrand": "", "CarLicense": "", "DriverName": "", "CarCompany": "" });
        const searchFormOptions = ref([[{ "title": "厂牌型号", "field": "CarBrand", "type": "like" }, { "title": "车牌号", "field": "CarLicense", "type": "like" }, { "title": "司机姓名", "field": "DriverName", "type": "like" }, { "title": "所属公司", "field": "CarCompany", "type": "like" }]]);
        const columns = ref([{ field: 'CarManagementId', title: '主键', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'CarBrand', title: '厂牌型号', type: 'string', width: 110, require: true, align: 'left', sort: true },
        { field: 'CarLicense', title: '车牌号', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'DriverName', title: '司机姓名', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'CarCompany', title: '所属公司', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'CarLong', title: '车长', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'CarWidth', title: '车宽', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'CarHight', title: '车高', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'CarColor', title: '颜色', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'CarBuyDate', title: '购置日期', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
        { field: 'CarRunLicence', title: '营运证号', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'InsuranceOverDate', title: '保险到期日期', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
        { field: 'CheckOverDate', title: '车检到期日期', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
        { field: 'InsuranceNumber', title: '保养公里数', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'CarImg', title: '车辆照片', type: 'img', width: 120, require: true, align: 'left' },
        { field: 'InsuranceImg', title: '保险卡照片', type: 'img', width: 120, require: true, align: 'left' },
        { field: 'CreateName', title: '创建人', type: 'string', width: 110, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'UpdateName', title: '修改人', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'UpdateTime', title: '修改时间', type: 'datetime', width: 150, hidden: true, align: 'left', sort: true },
        { field: 'IsDel', title: '逻辑删除标记，0 表示未删除，1 表示已删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
